﻿using Abp.Dependency;
using Abp.Quartz;
using DualControl.CycleCheckTasks;
using Quartz;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;

namespace DualControl.Web.Quartz
{
    public class GenerateTaskJob : JobBase, ITransientDependency
    {
        private readonly ICycleCheckTaskAppService _cycleCheckTaskAppService;

        public GenerateTaskJob(CycleCheckTaskAppService cycleCheckTaskAppService)
        {
            _cycleCheckTaskAppService = cycleCheckTaskAppService;
        }


       public override Task Execute(IJobExecutionContext context)
        {

            Logger.Info("生成排查任务开始执行,时间：" + DateTime.Now);
            _cycleCheckTaskAppService.GenerateCycleCheckTask();
            return Task.CompletedTask;
        }
    }
}
